package com.infotel.chat;

import java.io.File;
import java.util.List;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;


public class TestDOM4J {


    public static void main(String[] args)  {
        
        try {
            SAXReader reader = new SAXReader();
            Document document = reader.read(new File("src/com/infotel/chat/chat.xml"));
            List<Element> email = document.selectNodes("//user");
            for (Element e : email){
                System.out.println(e.attributeValue("email"));
            }
        } catch (DocumentException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        

    }

}
